This page last changed on Nov 16, 2005 by rossmason.

To set up a Tcp socket server in Mule for request/response processing you just need to add an inbound tcp endpoint to your component.

To set up a simple echo tcp server use the following configuration.

<mule-configuration id="Echo_Tcp_Server" version="1.0">
    <model name="dev">
        <mule-descriptor name="echoComponent"
            implementation="org.mule.components.simple.EchoComponent">
            <inbound-router>
                <endpoint address="tcp://localhost:12345" synchronous="true"/>
            </inbound-router>
        </mule-descriptor>
    </model>
</mule-configuration>

This will set up a tcp service to accept requests on localhost:12345. Note that the endpoint is synchronous which means that the request will be processed in a single thread and any return data will be sent back to the tcp client (in this case the echo component just returns the data it receives).

Document generated by Confluence on Nov 27, 2006 10:27